﻿<%@page import="java.text.SimpleDateFormat"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8" import="database.DAO, golf.ItemList,golf.OnItemList"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<script language="JavaScript">
<!--
	function go_URL(url)
	{
    	location.href = url;
	}
</script>

<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<title>아이템관리</title>
<meta name="generator" content="Namo WebEditor">
</head>
<%
	DAO dao = DAO.getInstance();
	int charNo = (Integer)session.getAttribute("charNo");
	String id = (String)session.getAttribute("accountID");
	int ENZI = dao.getOwnEnzi(charNo);
%>
<body bgcolor="white" text="black" link="blue" vlink="purple" alink="red">
<form name="form2">
    <table border="1" cellspacing="0" bordercolordark="white" bordercolorlight="black" width="36%">
        <tr>
            <td width="183"><span style="font-size:9pt;">현재보유엔지</span></td>
            <td width="285"><span style="font-size:9pt;"> <%out.println(ENZI);%> </span></td>
        </tr>
    </table>
    <p><span style="font-size:9pt;">&nbsp;</span></p>
</form>
<p><span style="font-size:9pt;">&nbsp;</span></p>

<form name="form1" method="post" action="../post/postVLItem.jsp">
    <p><span style="font-size:9pt;">가상라커룸</span></p>
    <% 
	//for( int i = 0; i < stores.length; i++ ){
		ItemList[] vlitems = dao.getVLockerItemList(id);	
	%>
    
    <table border="1" cellspacing="0" bordercolordark="white" bordercolorlight="black" width="1165">
        <tr>
            <td width="38"><span style="font-size:9pt;">&nbsp;</span></td>
            <td width="157"><span style="font-size:9pt;">아이템이름</span></td>
            <td width="83"><span style="font-size:9pt;">필요속성</span></td>
            <td width="85"><span style="font-size:9pt;">효과</span></td>
            <td width="84"><span style="font-size:9pt;">내구도</span></td>
            <td width="112"><span style="font-size:9pt;">필요레벨</span></td>
            <td width="112"><span style="font-size:9pt;">필요타이틀</span></td>
            <td width="112"><span style="font-size:9pt;">제한모델</span></td>
            <td width="112"><span style="font-size:9pt;">분류</span></td>
        </tr>
        <%if(vlitems!=null){
        for( ItemList vlitem : vlitems ){ %>
        <tr>
            <td width="38"><span style="font-size:9pt;"><input type="checkbox" name="info" value="<%=vlitem.getSeq_No()%>+<%=vlitem.getNo()%>">
            <input type="hidden" name="itemNo" value=<%=vlitem.getNo() %>></span></td>
            <td width="157"><span style="font-size:9pt;"><%=vlitem.getName() %></span></td>
            <td width="83"><span style="font-size:9pt;"><%=vlitem.getReqPropertyString() %></span></td>
            <td width="85"><span style="font-size:9pt;"><%=vlitem.getEffectPropertyString() %></span></td>
            <td width="84"><span style="font-size:9pt;"><%=vlitem.getCurr_durability() %>/<%=vlitem.getBasic_durability() %></span></td>
            <td width="112"><span style="font-size:9pt;">
            <%if(vlitem.getReq_level()>0){
            	out.println(vlitem.getReq_level());} 
            else
            	out.println("없음");%></span></td>
            <td width="55"><span style="font-size:9pt;">
            <%if(vlitem.getReq_character_grade()!=null) 
            	out.println(vlitem.getReq_character_grade().getName());
            else
            	out.println("없음");%></span></td>
            <td width="55"><span style="font-size:9pt;">
            <%if(vlitem.getReq_model()!=null) 
            	out.println(vlitem.getReq_model().getName());
            else
            	out.println("없음");%></span></td>
            <td width="112"><span style="font-size:9pt;"><%=vlitem.getCategory_name() %></span></td>
        </tr>
        <%} 
        }%>
         
    </table>
    <p><span style="font-size:9pt;"><input type="submit" name="action" value="가져가기">
  				  <input type="hidden" name="from" value="inventory"></span></p>
    </form>
<form name="form1" method="post" action="../post/postInvenItem.jsp">
    <p><span style="font-size:9pt;">개인용인벤토리</span></p>
    <% 
	//for( int i = 0; i < stores.length; i++ ){
		ItemList[] items = dao.getIvenItemList(charNo);	
	%>
    
    <table border="1" cellspacing="0" bordercolordark="white" bordercolorlight="black" width="1165">
        <tr>
            <td width="38"><span style="font-size:9pt;">&nbsp;</span></td>
            <td width="157"><span style="font-size:9pt;">아이템이름</span></td>
            <td width="83"><span style="font-size:9pt;">필요속성</span></td>
            <td width="85"><span style="font-size:9pt;">효과</span></td>
            <td width="84"><span style="font-size:9pt;">내구도</span></td>
            <td width="112"><span style="font-size:9pt;">필요레벨</span></td>
            <td width="112"><span style="font-size:9pt;">필요타이틀</span></td>
            <td width="112"><span style="font-size:9pt;">제한모델</span></td>
            <td width="112"><span style="font-size:9pt;">분류</span></td>
        </tr>
        <%if(items!=null){
        for( ItemList item : items ){ %>
        <tr>
            <td width="38"><span style="font-size:9pt;"><input type="checkbox" name="info" value="<%=item.getSeq_No()%>+<%=item.getNo()%>">
            <input type="hidden" name="itemNo" value=<%=item.getNo() %>></span></td>
            <td width="157"><span style="font-size:9pt;"><%=item.getName() %></span></td>
            <td width="83"><span style="font-size:9pt;"><%=item.getReqPropertyString() %></span></td>
            <td width="85"><span style="font-size:9pt;"><%=item.getEffectPropertyString() %></span></td>
            <td width="84"><span style="font-size:9pt;"><%=item.getCurr_durability() %>/<%=item.getBasic_durability() %></span></td>
            <td width="112"><span style="font-size:9pt;">
            <%if(item.getReq_level()>0){
            	out.println(item.getReq_level());} 
            else
            	out.println("없음");%></span></td>
            <td width="55"><span style="font-size:9pt;">
            <%if(item.getReq_character_grade()!=null) 
            	out.println(item.getReq_character_grade().getName());
            else
            	out.println("없음");%></span></td>
            <td width="55"><span style="font-size:9pt;">
            <%if(item.getReq_model()!=null) 
            	out.println(item.getReq_model().getName());
            else
            	out.println("없음");%></span></td>
            <td width="112"><span style="font-size:9pt;"><%=item.getCategory_name() %></span></td>
        </tr>
        <%} 
        }%>
       
    </table>
    <input type="radio" name="select" value="1"><span style="font-size:9pt;">착용하기</span>
    <input type="radio" name="select" value="4"><span style="font-size:9pt;">캐디백</span>
    <input type="radio" name="select" value="2"><span style="font-size:9pt;">길드아이템</span>
    <input type="radio" name="select" value="3"><span style="font-size:9pt;">락커룸</span>
    <p><span style="font-size:9pt;"><input type="submit" name="action" value="Transfer">
    <input type="hidden" name="from" value="inventory"></span></p>
</form>
<form name="form1" method="post" action="../post/postWearItem.jsp">
    <p><span style="font-size:9pt;">착용아이템</span></p>
    <%OnItemList[] onitems = dao.getWearItemList(charNo);	
    %>
    
    <table border="1" cellspacing="0" bordercolordark="white" bordercolorlight="black" width="1165">
        <tr>
            <td width="38"><span style="font-size:9pt;">&nbsp;</span></td>
            <td width="157"><span style="font-size:9pt;">아이템이름</span></td>
            <td width="84"><span style="font-size:9pt;">내구도</span></td>
            <td width="112"><span style="font-size:9pt;">분류</span></td>
        </tr>
        <%if(onitems!=null){
        	for( OnItemList onitem : onitems ){ %>
        <tr>
            <td width="38"><span style="font-size:9pt;"><input type="checkbox" name="info" value="<%=onitem.getSeq_No() %>+<%=onitem.getNo() %>"></span></td>
            <td width="157"><span style="font-size:9pt;"><%=onitem.getName() %></span></td>
            <td width="83"><span style="font-size:9pt;"><%=onitem.getCurr_durability() %>/<%=onitem.getBasic_durability() %></span></td>
            <td width="85"><span style="font-size:9pt;"><%=onitem.getCategory_name() %></span></td>
        </tr>
        <%}
        } %>
        
    </table>
    <p><span style="font-size:9pt;"><input type="submit" name="action" value="해제"></span></p>
</form>
<p><span style="font-size:9pt;">&nbsp;</span></p>
<p><span style="font-size:9pt;">&nbsp;</span></p>
<form name="form3" method="post" action="../post/postLockerItem.jsp">
    <p><span style="font-size:9pt;">라커룸</span></p>
   <% 
	//for( int i = 0; i < stores.length; i++ ){
		int svno = (Integer)session.getAttribute("serverNo");
		
		ItemList[] litems = dao.getLockerItemList(svno,id);	
	%>
    
    <table border="1" cellspacing="0" bordercolordark="white" bordercolorlight="black" width="1165">
        <tr>
            <td width="38"><span style="font-size:9pt;">&nbsp;</span></td>
            <td width="157"><span style="font-size:9pt;">아이템이름</span></td>
            <td width="83"><span style="font-size:9pt;">필요속성</span></td>
            <td width="85"><span style="font-size:9pt;">효과</span></td>
            <td width="84"><span style="font-size:9pt;">내구도</span></td>
            <td width="112"><span style="font-size:9pt;">필요레벨</span></td>
            <td width="112"><span style="font-size:9pt;">필요타이틀</span></td>
            <td width="112"><span style="font-size:9pt;">제한모델</span></td>
            <td width="112"><span style="font-size:9pt;">분류</span></td>
        </tr>
        <%if(litems!=null)
        {
        for( ItemList item2 : litems ){ %>
        <tr>
            <td width="38"><span style="font-size:9pt;"><input type="checkbox" name="seqNo" value="<%=item2.getSeq_No() %>"></span></td>
            <td width="157"><span style="font-size:9pt;"><%=item2.getName() %></span></td>
            <td width="83"><span style="font-size:9pt;"><%=item2.getReqPropertyString() %></span></td>
            <td width="85"><span style="font-size:9pt;"><%=item2.getEffectPropertyString() %></span></td>
            <td width="84"><span style="font-size:9pt;"><%=item2.getCurr_durability() %>/<%=item2.getBasic_durability() %></span></td>
            <td width="112"><span style="font-size:9pt;">
		 	<%if(item2.getReq_level()>0){
            	out.println(item2.getReq_level());} 
            else
            	out.println("없음");%></span></td>
            <td width="55"><span style="font-size:9pt;">
            <%if(item2.getReq_character_grade()!=null) 
            	out.println(item2.getReq_character_grade().getName());
            else
            	out.println("없음");%></span></td>
            <td width="55"><span style="font-size:9pt;">
            <%if(item2.getReq_model()!=null) 
            	out.println(item2.getReq_model().getName());
            else
            	out.println("없음");%></span></td>
            <td width="112"><span style="font-size:9pt;"><%=item2.getCategory_name() %></span></td>
        </tr>
        <%} 
        }%>
        
    </table>
    <p><span style="font-size:9pt;"><input type="submit" name="action" value="toInventory"><input type="hidden" name="from" value="locker"></span></p>
</form>
<p><span style="font-size:9pt;">&nbsp;</span></p>
<p><span style="font-size:9pt;">&nbsp;</span></p>
<p><span style="font-size:9pt;">&nbsp;</span></p>
<form name="form6" method="post" action="../post/postCaddyItem.jsp">
    <p><span style="font-size:9pt;">캐디백</span></p>
    <%OnItemList[] caddyitems = dao.getCaddyItemList(charNo);	
    %>
    
    <table border="1" cellspacing="0" bordercolordark="white" bordercolorlight="black" width="1165">
        <tr>
            <td width="38"><span style="font-size:9pt;">&nbsp;</span></td>
            <td width="157"><span style="font-size:9pt;">아이템이름</span></td>
            <td width="84"><span style="font-size:9pt;">내구도</span></td>
            <td width="112"><span style="font-size:9pt;">분류</span></td>
        </tr>
        <%if(caddyitems!=null){
        	for( OnItemList caddyitem : caddyitems ){ %>
        <tr>
            <td width="38"><span style="font-size:9pt;"><input type="checkbox" name="info" value="<%=caddyitem.getSeq_No() %>+<%=caddyitem.getNo() %>"></span></td>
            <td width="157"><span style="font-size:9pt;"><%=caddyitem.getName() %></span></td>
            <td width="83"><span style="font-size:9pt;"><%=caddyitem.getCurr_durability() %>/<%=caddyitem.getBasic_durability() %></span></td>
            <td width="85"><span style="font-size:9pt;"><%=caddyitem.getCategory_name() %></span></td>
        </tr>
        <%}
        } %>
        
    </table>
     <input type="radio" name="select" value="1"><span style="font-size:9pt;">착용하기</span>
    <input type="radio" name="select" value="2"><span style="font-size:9pt;">인벤토리</span>
    <p><span style="font-size:9pt;"><input type="submit" name="action" value="transfer"><input type="hidden" name="from" value="cadybag"></span></p>
</form>
<p>&nbsp;</p>
</body>

</html>